﻿@model OrderCompleteModel
@using Logistics.Web.Models.Order;

<h3>Order Complete</h3>
<p>Thank you for choosing SpotsHUB Express Shipping service! Your order number is <b>@Html.RouteLink("#" + Model.OrderId, "OrderDetails", new { controller = "Order", action = "Details", OrderId = Model.OrderId }, new { target = "_blank" })</b>. Please print out and attach the shipping label(s) to the respective package(s) for this order, listed below:</p>

<table class="order-complete-packages table table-striped">
    <thead>
        <tr><th>Package</th><th>Tracking Number</th><th>Status</th><th>Shipping Label</th></tr>
    </thead>
    <tbody>
        @for (var i = 0; i < Model.Packages.Count; i++)
        {
            var package = Model.Packages[i];
            <tr>
                <td>Package @(i + 1)</td>
                <td>@package.TrackingNumber</td>
                <td>@package.Status</td>
                <td>@Html.ActionLink("Download", "DownloadWaybill", "Order", new { id = package.Id }, new { @class = "btn btn-normal", target = "_blank" })</td>
            </tr>
        }
    </tbody>
</table>
<div class="complete-buttons row">
    <div class="col-xs-12 col-md-4">
        <input type="button" class="btn btn-normal form-control" data-action="clearOrder" data-url="@Url.Action("RemovePendingOrder", "Order")" value="Create New Order" />
    </div>
    <div class="col-xs-12 col-md-4">
        <a href="@Url.Action("Tracking", "Customer" , new { area="" })" class="btn btn-normal form-control" value="My Orders">My Orders</a>
    </div>
    <div class="clear"></div>
</div>
